﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<mediatheque.oeuvre>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                id
            </th>
            <th>
                titre
            </th>
            <th>
                auteur
            </th>
            <th>
                date_publication
            </th>
            <th>
                date_edition
            </th>
            <th>
                duree_totale
            </th>
            <th>
                nb_pages
            </th>
            <th>
                type
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Details", "Details", new { id=item.id })%> 
            </td>
            <td>
                <%: item.id %>
            </td>
            <td>
                <%: item.titre %>
            </td>
            <td>
                <%: item.auteur %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.date_publication) %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.date_edition) %>
            </td>
            <td>
                <%: item.duree_totale %>
            </td>
            <td>
                <%: item.nb_pages %>
            </td>
            <td>
                <%: item.type %>
            </td>
        </tr>
    
    <% } %>

    </table>

</asp:Content>

